package cn.wizzer.app.user.modules.models;


import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.math.BigDecimal;

@Data
@Table("gift")
public class Gift extends BaseModel {
    @Column
    @Name
    @Comment("ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(els = {@EL("uuid()")})
    private String id;

    @Column
    @Comment("名称")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String name;

    @Column
    @Comment("价格")
    @ColDefine(type=ColType.FLOAT, width=16, precision=6)
    private BigDecimal price;

    @Column("cover_pic")
    @Comment("封面图")
    @ColDefine(type = ColType.VARCHAR, width = 128)
    private String coverPic;

    @Column
    @Comment("禁用?1:0")
    @Default("0")
    @ColDefine(type = ColType.BOOLEAN)
    private boolean disabled;

}
